package com.lzx.applib.mvp;

/**
 * Created by Administrator on 17/07/23.
 */

public class BasePresenter<M extends IBaseModel, V extends IBaseView> implements IBasePresenter {

    protected M model;
    protected V view;

    public BasePresenter(V view) {
        this(null, view);
    }

    public BasePresenter(M model, V view) {
        this.model = model;
        this.view = view;
    }

    @Override
    public void onCreate() {

    }

    @Override
    public void onStart() {

    }

    @Override
    public void onResume() {

    }

    @Override
    public void onPause() {

    }

    @Override
    public void onStop() {

    }

    @Override
    public void onDestroy() {
        if (model != null) {
            model.onDestroy();
            model = null;
        }
        view = null;
    }
}
